#!/usr/bin/python
# -*- coding: utf8 -*-
import sys
from PyQt4 import QtCore, QtGui
from tela import Ui_principal

arquivoTexto = ''

def processar_clicked():
    
    
    myapp.ui.txtEquipe1.setText('Bla!!')

def abrir_arquivo():
    arquivoTexto = QtGui.QFileDialog.getOpenFileName(myapp, 'Abrir Arquivo', '/home/celso')
    myapp.ui.txtArquivoEntrada.setText(arquivoTexto)

class MyForm(QtGui.QMainWindow):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_principal()
        self.ui.setupUi(self)


if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    myapp = MyForm()
    myapp.show()
    myapp.connect(myapp.ui.btnProcessar, QtCore.SIGNAL('clicked()'),processar_clicked)
    myapp.connect(myapp.ui.btnArquivo, QtCore.SIGNAL('clicked()'), abrir_arquivo)
    sys.exit(app.exec_())